<template>
  <div class="home">
    <h2>欢迎使用自动化测试平台</h2>
    <p>本平台支持通过配置化方式创建、管理、执行 API 测试用例，并生成详细的测试报告。</p>

    <div class="features">
      <div class="feature-card">
        <h3>📋 用例管理</h3>
        <p>通过表单配置创建和编辑测试用例，支持多种 HTTP 方法和 JSON 数据。</p>
      </div>
      <div class="feature-card">
        <h3>⚡ 一键执行</h3>
        <p>点击按钮即可执行单个或全部测试用例，实时查看执行结果。</p>
      </div>
      <div class="feature-card">
        <h3>📊 报告生成</h3>
        <p>执行后自动生成包含响应、日志、耗时的详细测试报告。</p>
      </div>
    </div>

    <div class="cta">
      <router-link to="/cases" class="btn-primary">开始创建用例</router-link>
    </div>
  </div>
</template>

<script setup></script>

<style scoped>
.home {
  text-align: center;
  padding: 40px 20px;
}

.home h2 {
  color: #333;
  margin-bottom: 20px;
}

.home p {
  color: #666;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 40px;
}

.features {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.feature-card {
  background: white;
  padding: 30px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 280px;
  text-align: left;
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  margin: 0 0 15px 0;
  color: #333;
}

.feature-card p {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.cta {
  margin-top: 20px;
}

.btn-primary {
  display: inline-block;
  background-color: #42b983;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #3aa876;
}
</style>
